<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="content">
        <div class="panel panel-default panel-intro">

            <div class="panel-body">
                <div id="myTabContent" class="tab-content">
                    <div class="tab-pane fade active in" id="one">
                        <div class="widget-body no-padding">

                            <div class="bootstrap-table">
                                <div class="commonsearch-table ">
                                    <fieldset>
                                        <div class="form-group">
                                            <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title}" disabled>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-xs-12 col-sm-2">{:__('入库仓库')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <input id="c-storehouse" data-rule="required" data-source="data/storehouse/index" data-field="name" class="form-control selectpage" name="storehouse_id" type="text" value="{$row.storehouse_id}" disabled>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label for="c-thumb" class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <div class="input-group">
                                                    <input id="c-thumb" class="form-control" size="50" name="image" type="text" value="{$row['image']}"  disabled/>
                                                    <div class="input-group-addon no-border no-padding">
                                                            <span>
                                                                <button type="button" id="plupload-imagethumb" class="btn btn-danger plupload" data-input-id="c-thumb" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/webp" data-multiple="true" data-preview-id="p-thumb" disabled>
                                                                <i class="fa fa-upload"></i>上传</button>
                                                            </span>
                                                    </div>
                                                    <span class="msg-box n-right"></span>
                                                </div>
                                                <ul class="row list-inline plupload-preview" id="p-thumb" data-template="customtpl"></ul>
                                            </div>
                                        </div>

                                    </fieldset>
                                </div>
                            </div>
                            <hr>
                            <span>生产商品</span>
                            <div class="fixed-table-toolbar"><div class="bs-bars pull-left"><div id="toolbar" class="toolbar" style="position: relative;">
<!--                                <a href="javascript:;" class="btn btn-success btn-add " title="添加"><i class="fa fa-plus"></i> 添加</a>-->
                            </div>
                            </div>
                                <div class="columns-right pull-right" style="margin-top:10px;margin-bottom:10px;">
                                </div>
                                <table id="table" class="table table-striped table-bordered table-hover table-nowrap"  data-operate-edit="1" data-operate-del="1" width="100%">
                                    <thead>
                                    <tr>
                                        <th style="text-align: center; vertical-align: middle; " data-field="id"><div class="th-inner ">Id</div></th>
                                        <!--                                <th style="text-align: center; vertical-align: middle; " data-field="createtime"><div class="th-inner ">出库仓库</div></th>-->
                                        <th style="text-align: center; vertical-align: middle; " ><div class="th-inner ">{:__('Title')}</div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="operator"><div class="th-inner ">{:__('Brands_id')}</div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="company"><div class="th-inner ">{:__('Place_origin')}</div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="number"><div class="th-inner ">{:__('Unit')}</div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="supplier_id"><div class="th-inner ">{:__('Specs')}</div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="supplier_id"><div class="th-inner ">{:__('Num')}</div></th>
                                        <th style="text-align: center; vertical-align: middle; " data-field="supplier_id"><div class="th-inner ">{:__('Cost')}</div></th>
                                    </tr>
                                    </thead>
                                    <tbody data-listidx="0" class="connnn">
                                        {volist name="goods" id="vo"}
                                            <tr data-index="0">
                                                <td style="text-align: center; vertical-align: middle; ">
                                                    <input name="cost['+res.id+']['+'goods_id'+']" value="" style="display: none" class="gid ">
                                                    {$vo.goods_id}
                                                </td>
                                                <td style="text-align: center; vertical-align: middle; ">{$vo.title}</td>
                                                <td style="text-align: center; vertical-align: middle; ">{$vo.brand}</td>
                                                <td style="text-align: center; vertical-align: middle; ">{$vo.place_origin}</td>
                                                <td style="text-align: center; vertical-align: middle; " class="title">{$vo.unit}</td>
                                                <td style="text-align: center; vertical-align: middle; ">{$vo.specs}</td>
                                                <td style="text-align: center; vertical-align: middle; " class="">
                                                    <input type="text"  style="display: none" class="" name="" value="1">
                                                    <span class=" ">{$vo.production_num}</span>
                                                </td>
                                                <td style="text-align: center; vertical-align: middle; " class="">
                                                     <input type="text" class="form-control " style="display: none" value="" name="">
                                                         <span class="">{$vo.cost}</span>
                                                </td>
                                            </tr>
                                        {/volist}
                                    </tbody>

                                    <tbody class="tbfoot" data-listidx="0" style="display: none">
                                        <td style="text-align: center; vertical-align: middle; ">合计</td>
                                        <td style="text-align: center; vertical-align: middle; "></td>
                                        <td style="text-align: center; vertical-align: middle; "></td>
                                        <td style="text-align: center; vertical-align: middle; "></td>
                                        <td style="text-align: center; vertical-align: middle; " ></td>
                                        <td style="text-align: center; vertical-align: middle; " ></td>
                                        <td style="text-align: center; vertical-align: middle; " class="">{$allNum}</td>
                                        <td style="text-align: center; vertical-align: middle; " >{$allCost}</td>
                                    </tbody>
                                </table>
                            </div>
                            <br>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>



</form>

{if condition="$row.status == 1 "}
<div class="form-group layer-footer">
    <label class="control-label col-xs-3 col-sm-2"></label>
    <div class="col-xs-12 col-sm-3">
        <button type="submit" class="btn btn-danger btn-embossed cancelbill {:$auth->check('sales/slip/cancelbill')?'':'hide'}">{:__('单据红冲')}</button>
    </div>
</div>
{else /}

{/if}

<script type="text/html" id="customtpl">
    <li class="col-xs-3">
        <a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail"><img src="<%=fullurl%>" class="img-responsive"></a>
    </li>
</script>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
<script>

</script>
{include file='common/footer' /}